<html>
<head><meta charset="utf-8"><title>leak-check removal · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/leak-check.20removal.html">leak-check removal</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="187849321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/leak-check%20removal/near/187849321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/leak-check.20removal.html#187849321">(Feb 10 2020 at 19:24)</a>:</h4>
<p>So <span class="user-mention" data-user-id="116118">@Matthew Jasper</span> -- now that the first leak-check PR landed, one of the things I wanted to do was to enumerate the next steps. I think the things on my mind are:</p>
<ul>
<li>integrate the 'empty' treatment with NLL</li>
<li>figure out what we are going to do about the wasm-bindgen regressions</li>
<li>..?</li>
</ul>



<a name="187849338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/leak-check%20removal/near/187849338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/leak-check.20removal.html#187849338">(Feb 10 2020 at 19:24)</a>:</h4>
<p>On the latter point in particular, I was curious if you agreed with my reasoning on why we probably <em>should</em> be accepting those impls</p>



<a name="187851861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/leak-check%20removal/near/187851861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/leak-check.20removal.html#187851861">(Feb 10 2020 at 19:54)</a>:</h4>
<p>I agree that <code>dyn for&lt;'a&gt; Fn(&amp;'a A)</code> and <code>dyn Fn(&amp;'r A)</code> are not equal for any choice of <code>'r</code>. I had two concerns:</p>
<ul>
<li>I don't know how we can check for cases like this in a way that works for both selection and coherence.</li>
<li>At some point we may consider <code>dyn for&lt;'a&gt; Fn(&amp;'a &amp;'r A, &amp;'r &amp;'a A)</code> and <code>dyn Fn(&amp;'b &amp;'b A, &amp;'b &amp;'b A)</code>to be equal if <code>'a == 'b</code> (because of the implied <code>'a == 'r</code> bound) but I can't see how this  can be distinguished from the case above.</li>
</ul>



<a name="187855741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/leak-check%20removal/near/187855741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/leak-check.20removal.html#187855741">(Feb 10 2020 at 20:40)</a>:</h4>
<p><span class="user-mention" data-user-id="116118">@Matthew Jasper</span> yes, I agree on the second point, and I remember that this <em>specifically</em> was a reason I wanted to be "maximally cosnervative" here. i.e., to give us room to get smarter about which regions outlive which other ones</p>



<a name="187855756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/leak-check%20removal/near/187855756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/leak-check.20removal.html#187855756">(Feb 10 2020 at 20:40)</a>:</h4>
<p>or at least, I agree that's something I want to think carefully about</p>



<a name="187855800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/leak-check%20removal/near/187855800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/leak-check.20removal.html#187855800">(Feb 10 2020 at 20:41)</a>:</h4>
<p>as to the first point, I guess one way to go about this might be to rework the leak-check to be much more conservative about what it rejects</p>



<a name="187855822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/leak-check%20removal/near/187855822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/leak-check.20removal.html#187855822">(Feb 10 2020 at 20:41)</a>:</h4>
<p>that would apply equally</p>



<a name="187855838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/leak-check%20removal/near/187855838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/leak-check.20removal.html#187855838">(Feb 10 2020 at 20:41)</a>:</h4>
<p>but it still requires us to wrestle with the second point, I have to look carefully at those types you gave as examples :)</p>



<a name="187856752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/leak-check%20removal/near/187856752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/leak-check.20removal.html#187856752">(Feb 10 2020 at 20:52)</a>:</h4>
<blockquote>
<p>as to the first point, I guess one way to go about this might be to rework the leak-check to be much more conservative about what it rejects</p>
</blockquote>
<p>It does seem like "a worse leak check" is roughly what this would have to be, for now.</p>



<a name="187857716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/leak-check%20removal/near/187857716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/leak-check.20removal.html#187857716">(Feb 10 2020 at 21:02)</a>:</h4>
<p>"worse"?</p>



<a name="187857737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/leak-check%20removal/near/187857737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/leak-check.20removal.html#187857737">(Feb 10 2020 at 21:02)</a>:</h4>
<p>I'd have said "better" -- i.e., not rejecting things that are valid :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>